package com.example.j202411.viewmodel;

import android.app.Application;

import androidx.annotation.NonNull;
import androidx.lifecycle.AndroidViewModel;
import androidx.lifecycle.LiveData;


import com.example.j202411.Model.BusResponse.BusInfo;
import com.example.j202411.repository.BusRepository;

import java.util.List;

public class BusViewModel extends AndroidViewModel {

    private BusRepository busRepository;

    public BusViewModel(@NonNull Application application) {
        super(application);
        busRepository = new BusRepository();
    }

    public LiveData<List<BusInfo>> getBusInfo(String city, String line, String direction) {
        return busRepository.getBusInfo(city, line, direction);
    }
}